﻿@using Devonline.Identity.Admin
@model Devonline.Identity.Admin.Models.BindPhoneNumberViewModel
@inject AdminSetting _adminSetting;
@{
    Layout = null;
    ViewBag.Title = "用户登录";
    var name = _adminSetting.Name;
    var copyright = _adminSetting.Copyright;
    var license = _adminSetting.License;
}

<html lang="en">
<head>
    <meta charset="utf-8">
    <title>@name - 用户登录</title>
    <link rel="shortcut icon" href="~/favicon.ico" />
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="~/lib/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="~/css/login.css">
</head>
<body class="page-md login">
    <div class="content" style="width:540px">
        <div class="logo">
            <h3>@name</h3>
        </div>
        <div class="password-and-mobile-method method col-md-offset-2 col-md-8">
            <div class="main-sign">
                <div class="sms-title"><h4>绑定手机号码</h4></div>
                <div id="sms-login" class="sms-login">
                    <form action="/account/ConfirmPhoneNumber" method="post" onkeydown="if (event.keyCode == 13) { Account.onLogin(this); }" onsubmit="return Account.onSubmitCaptcha(this)">
                        <div class="login-error">
                            <span class="error-info">@Model.ErrorMessage</span>
                        </div>
                        <input type="hidden" name="type" value="Captcha">
                        <div class="form-group">
                            <div class="input-icon phoneNumber">
                                <i class="fa fa-mobile-phone">+86</i>
                                <input class="form-control placeholder-no-fix" type="text" placeholder="请输入手机号码" name="userName" value="@Model.PhoneNumber">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="input-icon captcha">
                                <input class="form-control placeholder-no-fix" placeholder="请输入验证码" name="code">
                                <i class="fa">
                                    <span class="countdown"></span>
                                    <a onclick="Account.sendCaptcha(this)" class="send-btn-link send-btn-disabled">获取验证码</a>
                                </i>
                            </div>
                        </div>
                        <input type="hidden" name="returnUrl" value="@Model.ReturnUrl">
                        <div class="form-actions">
                            <button type="submit" class="btn blue pull-right">立即绑定</button>
                            <a class="sms-back pull-right" href="#">返回上一步</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <footer id="_footer_" class="border-top footer text-center">
        <div class="container">
            &copy; 2020-@DateTime.Now.Year - @copyright <a href="https://beian.miit.gov.cn/" target="_blank">@license</a>
        </div>
    </footer>

    <script src="~/lib/jquery/dist/jquery.min.js" asp-append-version="true"></script>
    <script src="~/lib/bootstrap/dist/js/bootstrap.min.js" asp-append-version="true"></script>
    <script src="~/lib/backstretch/jquery.backstretch.min.js" type="text/javascript" asp-append-version="true"></script>
    <script src="~/lib//devonline/js/com.js" type="text/javascript" asp-append-version="true"></script>
    <script src="~/lib//devonline/js/config.js" type="text/javascript" asp-append-version="true"></script>
    <script src="~/lib//devonline/js/extensions.js" type="text/javascript" asp-append-version="true"></script>
    <script src="~/lib//devonline/js/localCache.js" type="text/javascript" asp-append-version="true"></script>
    <script src="~/js/account.js" asp-append-version="true"></script>
    <span role="status" aria-live="polite" class="select2-hidden-accessible"></span>
    <script>
        $(function () {
            $.backstretch(["/img/bg/1.jpg", "/img/bg/2.jpg", "/img/bg/3.jpg"], { fade: 1000, duration: 3000 });
            var $back = $('#sms-login form .form-actions .sms-back');
            var redirectUrl = $.com.getQueryStringByName('redirect_url');
            if (!$.com.hasValue(redirectUrl)) {
                redirectUrl = $('#sms-login form [name="returnUrl"]').val();
            }

            $back.attr('href', redirectUrl);
        });
    </script>
    <div class="backstretch">
        <img src="~/img/bg/1.jpg">
    </div>
</body>
</html>
